/**************************************************************************
* This file is part of Hawkengine.
*
* Hawkengine is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Hawkengine is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Hawkengine.  If not, see <http://www.gnu.org/licenses/>.
**************************************************************************/

#ifndef _APP_H_
#define _APP_H_

/**************************************************************************
* Dependencies
**************************************************************************/
#include "engine/common.h"
#include "engine/engine.h"
 
/**************************************************************************
* Preprocessing
**************************************************************************/
#ifdef __cplusplus
extern "C" {
#endif

#define MAX_GAME_NAME 11
#define NUM_TOP_SCORES 10
#define ANIMATION_SECS 0.5
#define MAX_SCORE_CHARS 8

/**************************************************************************
* Types
**************************************************************************/
typedef struct
{
  float score;
  char date[MAX_DATE_LENGTH];
} score_type;

/**************************************************************************
* Variables
**************************************************************************/
extern bounds_type app_bounds;

/**************************************************************************
* Static Variables
**************************************************************************/

/**************************************************************************
* Function Prototypes
**************************************************************************/
void app_init(void);
void app_navigate(navigation_type navigation);
void app_render(const bounds_type* bounds);
void app_resize(const bounds_type* bounds);
BOOL app_session_load(void);
void app_session_save(void);
void app_settings_save(void);
void app_start(void);
void app_stop(BOOL won);
void app_touch_move(const touch_type* touch);
void app_touch_start(const touch_type* touch);
void app_touch_stop(const touch_type* touch);
void app_uninit(void);
void app_update(float secs);

/**************************************************************************
* Function Implementations
**************************************************************************/


#ifdef __cplusplus
}
#endif

#endif
